Skip to main content

Get Dropdown Values

AutomatR.Web.GetDropdownValues

The "Get Dropdown Values" activity in AutomatR's Web Activities category provides a list of dropdown values for a specified web element. This activity is particularly useful when you need to retrieve and analyze the available options within a dropdown menu during web automation.

Properties

NameDescription
Input
ElementAllows you to select the web element using the selector window. Use this property if you want to indicate the web element directly within the activity.
WebElementSpecifies the UI Element variable identified by the "Find Element" or other activities. This allows you to use a previously identified web element in the workflow.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get Dropdown Values" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
TimeoutSpecifies the maximum time (in seconds) to wait for the activity to be executed before throwing an exception. Integer variables containing the timeout duration. The default timeout is set in the Constants.Timeout constant.
Output
ResultOutputs a list of strings representing the dropdown values. Use a list variable of type string to store the retrieved values for further processing within the workflow.

How to use:

  1. Drag and drop the "Get Dropdown Values" activity onto the workflow.
  2. Configure the properties by choosing either the direct web element or providing a UI Element variable.
  3. Optionally, configure the delay and timeout based on your requirements.
  4. Create a list variable of type string to store the dropdown values (e.g., "dropdownValues").
  5. Execute the workflow to obtain the dropdown values from the specified web element.

Example: Consider an example where the "Get Dropdown Values" activity is used to retrieve the values from a dropdown menu on a web page:

Get Dropdown Values:
Delay: 2
Timeout: 10
Element: Selector forDropdownElement
Result: dropdownValues

In this example, the activity waits for 2 seconds (optional) and has a timeout of 10 seconds. It retrieves the dropdown values from the web element identified by the selector "forDropdownElement" and stores them in the "dropdownValues" list variable for further use.